<div id="actionbar">
    <button class="button button-blue bar" url="{:url('fund/winCoupon')}" msg="您确认要关联已选优惠券吗？"><i class="iconfont icon-lianjie"></i>关联补贴优惠券</button> 
</div>
<table class="pure-table">
    <thead>
        <tr>
            <th class="w40 fn-tac"><input type="checkbox" onclick="CheckAll(this)"></th>
            <th>名称</th>
            <th class="w80 fn-tar">购买价</th>
            <th class="w100 fn-tac">￥额度</th>
            <th class="w80 fn-tac">￥满用</th>
            <th class="w100 fn-tac">抵扣/折扣</th>
            <th class="w200 fn-tac">有效期</th>
            <th>使用规则</th>
        </tr>
    </thead>
    <tbody>
        {foreach $lists as $vo}
        <tr>
            <td class="fn-tac"><input name="ids[]" type="checkbox" value="{$vo.id}"></td>
            <td>{$vo.name}</td>
            <td class="fn-tar">{$vo.pay_price}</td>
            <td class="fn-tar">{$vo.size}元</td>
            <td class="fn-tar">{$vo.howmuch}元</td>
            <td class="fn-tac">{if $vo.types}<span class="badge bg-blue">{$vo.discount}折</span>{else}<span class="badge bg-green">{$vo.price}元</span>{/if}</td>
            <td class="fn-tac">{$vo.starttime|date="Y-m-d"} 至 {$vo.endtime|date="Y-m-d"}</td>
            <td>{$vo.tips}</td>
        </tr>
        {/foreach}
    </tbody>
</table>
{$lists|raw}
<script type="text/javascript">
Do('base','layer',function(){
    $(".bar").click(function() {
        var url = $(this).attr('url');
        var msg = $(this).attr('msg');
        tools_submit({action:url,msg:msg})
    })
})
</script>